﻿#include "missionplanningbutton.h"
extern int leftDockBabyred,leftDockBabygreen,leftDockBabyblue;
extern float leftDockBabytransparency;
extern void setButtonStyle(QPushButton *pushButton, const QString &imageUrl1, const QString &imageUrl2);
MissionPlanningButton::MissionPlanningButton(QWidget *parent) :
    QPushButton(parent)
{
    widget = new QWidget(parent);
    widget->setStyleSheet(QString("background-color:rgba(%1,%2,%3,%4);").arg(leftDockBabyred).arg(leftDockBabygreen).arg(leftDockBabyblue).arg(leftDockBabytransparency));
    widget->setFixedSize(500,500);
    widget->move(140,0);
    QVBoxLayout *layout=new QVBoxLayout(widget);
    routeConnect=new QPushButton(widget);
    routeConnect->setFixedSize(100,100);
    routeMarker=new QPushButton(widget);
    routeMarker->setFixedSize(100,100);
    planeMoveBtn=new QPushButton(widget);
    planeMoveBtn->setFixedSize(100,100);
    layout->addWidget(routeMarker);
    layout->addWidget(routeConnect);
    layout->addWidget(planeMoveBtn);
    widget->setLayout(layout);
    setButtonStyle(routeConnect,":/image/routeConnect.png",":/image/routeConnect_2.png");
    setButtonStyle(routeMarker,":/image/routeMarker.png",":/image/routeMarker2.png");
    setButtonStyle(planeMoveBtn,":/image/planeMove.png",":/image/planeMove2.png");
    triangleWidget = new TriangleWidget(widget);
    triangleWidget->setFixedSize(100,100);
    triangleWidget->move(0,240);
    triangleWidget->setVisible(true);
}
